<template>
	<view class="funds-page">
		<view class="funds-scroll">
			<view class="funds-list">
				<view v-for="(item, key) in dataList" :key="key" class="funds-item">
					<view class="funds-box">
						<view class="funds-name">{{item.title}}</view>
						<view class="funds-value">0.00</view>
						<!-- <view class="funds-value">0</view> -->
					</view>
					<view class="h-line"></view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {realNameAuth} from '@/api/member.js'
	import {getRankPage} from '@/api/rank.js'
	import {toUserPage} from '@/utils/PageRouter.js'
	
	var dcRichAlert = uni.requireNativePlugin('Trader')
	export default {
		data() {
			return {
				form: {},
				userInfo: {},
				dataList: [
					{title: '日期'},
					{title: '币种'},
					{title: '期初权益'},
					{title: '当前权益'},
					{title: '可用资金'},
					{title: '可取资金'},
					{title: '风险度'},
					{title: '保证金'},
					{title: '挂单冻结保证金'},
					{title: '挂单冻结资金'},
					{title: '持仓盈亏'},
					{title: '平仓盈亏'},
					{title: '手续费'},
					{title: '挂单手续费'},
					{title: '入金金额'},
				]
			}
		},
		onShow() {
			this.getUserInfo()
			this.getInfo()
		},
		//	下拉刷新
		onPullDownRefresh() {
			setTimeout(() => {
				uni.stopPullDownRefresh()
			}, 2000)
		},
		methods: {
			//	获取信息
			getInfo() {
				dcRichAlert.reqQrySecAgentTradingAccount({}, function(res) {
					uni.showToast({icon: 'none', title: res.data})
				})
			},
			//	获取用户信息
			getUserInfo () {
				const userInfo = uni.getStorageSync('MEMBER_INFO')
				this.userInfo = userInfo
			}
		}
	}
</script>

<style lang="scss" scoped>
	.funds-page{
		min-height: 100vh;
		padding: 0 30rpx;
		background: #fff;
		
		.funds-list{
			.funds-item{
				&:last-child{
					.h-line{display: none;}
				}
			}
			.funds-box{
				height: 90rpx;
				display: flex;
				font-size: 32rpx;
				align-items: center;
				justify-content: space-between;
				.funds-name{
					width: 250rpx;
				}
			}
		}
	}
</style>
